package com.ld.data.business.file.controller;

import com.ld.data.business.file.service.FileService;
import com.ld.data.business.file.vo.FileRespVo;
import com.ld.data.common.ResultResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@Tag(name = "文件相关接口")
@RestController
public class FileController {

    @Autowired
    private FileService fileService;

    @PostMapping("/api/fileData/file/simpleUploadFile")
    @Operation(summary = "简单的文件文件上传", description = "简单的文件文件上传")
    public ResultResponse<FileRespVo> simpleUploadFile(@RequestParam("file") MultipartFile file){
        FileRespVo fileRespVo = fileService.simpleUploadFile(file);
        return ResultResponse.success(fileRespVo);
    }


}
